<template>
    <div class="right pointer">
        <div class="jx_title flex-align">
            <img src="~/assets/images/csjh/icon_jx.png" alt="" />
            <span class="c333 fz20">精选推荐</span>
        </div>
        <div class="jx_main">
            <div
                class="jx_item c333 fz14"
                v-for="(item, index) in arr"
                :key="index"
                @click="click(item)"
            >
                <div>{{ item.title }}</div>
            </div>
        </div>

        <!-- 弹出层 -->
        <el-dialog :visible.sync="showToast" width="25%">
            <div class="showTips flex">
                <div class="r_tips flex-column">
                    <span class="tips fz18 c333"
                        >网页端暂未开放，请大侠移步小竹财税APP，获取您想要的秘籍。</span
                    >
                    <img src="~/assets/images/index/app_code.png" alt="" />
                    <span class="fz14 c666 mt10">扫码下载APP</span>
                </div>
            </div>
        </el-dialog>
    </div>
</template>

<script>
export default {
    props: {
        arr: {
            type: Array,
            default: () => {
                return [];
            },
        },
    },
    data() {
        return {
            jxList: [],
            showToast: false,
        };
    },
    created() {},
    methods: {
        click(item) {
            this.$emit("onItemClick", item);
        },
        goAsk() {
            this.$emit('ask')
            // this.showToast = true;
            // this.$router.push({
            //     path: '/AskInfo',
            // })
        },
    },
};
</script>

<style lang="scss" scoped>
@import url("@/assets/static/reset.css");

.right {
    margin-top: 12px;
    margin-left: 13px;
    width: 326px;
    border-radius: 10px;
    overflow: hidden;

    .jx_title {
        padding-left: 30px;
        height: 60px;
        // border-bottom: 1px solid #e6e6e6;
        background-color: #fff;

        img {
            margin-right: 5px;
            width: 25px;
            height: 25px;
        }
    }
    .jx_main {
        background-color: #fff;
        // padding-top: 20px;

        .jx_item {
            padding: 20px 30px;
            border-top: 1px solid #ebebeb;

            div {
                overflow: hidden;
                /* 三行显示省略号 */
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
            }
        }
        .button {
            margin: 0 auto;
            color: #fff;
            text-align: center;
            line-height: 45px;
            width: 148px;
            height: 45px;
            background: #1c87f3;
            box-shadow: 0px 7px 10px 2px rgba(28, 135, 243, 0.3);
            border-radius: 82px;
            cursor: pointer;
        }
    }

    .showTips {
        .r_tips {
            margin: 0 auto;
            text-align: center;

            .tips {
                width: 281px;
            }
            img {
                margin: 0 auto;
                margin-top: 20px;
                width: 120px;
                height: 120px;
            }
        }
    }
}
</style>
